package cn.lix.sc.rpc.impl.common.exception;

import cn.lix.sc.rpc.impl.common.constant.ResponseCode;

/**
 * 调用异常
 * @date 2021/4/27
 * @author lix
 * @email sclx1220@163.com
 */
public class RemoteException extends BaseException {


    protected RemoteException(Throwable cause, Integer code, String desc, Object... args) {
        super(cause, code, desc, args);
    }

    public static RemoteException error(String desc, Object... args){
        return new RemoteException(null, ResponseCode.ERROR, desc, args);
    }

    public static RemoteException error(Throwable cause, String desc, Object... args){
        return new RemoteException(cause, ResponseCode.ERROR, desc, args);
    }

}
